<template>
  <div class="coopen" v-if="isCoopen">
    <img class="coopen_img_top" src="@/assets/image/coopen_top.png" />
    <img class="coopen_img_bottom" src="@/assets/image/coopen_bottom.png" />
  </div>
</template>

<script>
import { defineComponent, ref } from 'vue'

export default defineComponent({
  name: 'Coopen',
  components: {},

  setup() {
    const isCoopen = ref(process.env.NODE_ENV === 'development' ? false : true)
    setTimeout(() => {
      isCoopen.value = false
    }, 2000)
    return { isCoopen }
  }
})
</script>

<style lang="scss" scoped>
.coopen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: #fff;
  > img {
    position: absolute;
    left: 0;
  }
  .coopen_img_top {
    width: 100px;
    height: 133px;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .coopen_img_bottom {
    bottom: 0;
    width: 100%;
  }
  @supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
    .coopen {
      height: calc(100% + env(safe-area-inset-bottom));
      height: calc(100% + constant(safe-area-inset-bottom));
    }
  }
}
</style>
